<?php
/* Description: This file is used to add sub sub category. */
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/Master/Master.php';
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

$id = trim($_REQUEST['id']);

if( $_POST['submit']=='Submit'){   
	$parms['id'] = $_POST['id'];
	$parms['category'] = $_POST['category'];
	$parms['description'] = $_POST['description'];
	$parms['added'] = date("Y-m-d h:i:s");
	 
	$condition['id'] = $parms['id'];
	
    if( CommonUtility::updateData($parms, 'menu_category_master', $condition)) {        
        header("Location: menu_category_mng.php?msg=1706");            
        exit;
    }
    $err = 1707;    
}

$menu_categories = array();
$menu_categories = Master::getMenuCategoryList($id);
$result = $menu_categories[0];

$errMsg = $err;
$_tplName = 'master/menu_category_edit.tpl';
$_title = 'Edit Menu Category';

require_once _ADMIN_TPL_MAIN_;
?>